@JsonSerializable(
  checked: true,
  createToJson: true,
  disallowUnrecognizedKeys: true,
  explicitToJson: true,
)
class {{{classname}}} {
{{>dart_constructor}}

{{#vars}}
  {{#description}}
      /// {{{description}}}
  {{/description}}
  {{^isEnum}}
      {{#minimum}}
          // minimum: {{{minimum}}}
      {{/minimum}}
      {{#maximum}}
          // maximum: {{{maximum}}}
      {{/maximum}}
  {{/isEnum}}
  {{^isBinary}}
  @JsonKey(
    {{#defaultValue}}defaultValue: {{{defaultValue}}},{{/defaultValue}}{{^defaultValue}}nullable: {{isNullable}},{{/defaultValue}}
    name: r'{{{baseName}}}',
    required: {{#required}}true{{/required}}{{^required}}false{{/required}},
  )
  {{/isBinary}}
  {{#isBinary}}
  @JsonKey(ignore: true)
  {{/isBinary}}
  {{{datatypeWithEnum}}} {{{name}}};

{{/vars}}
  @override
  bool operator ==(Object other) => identical(this, other) || other is {{{classname}}} &&
  {{#vars}}
     other.{{{name}}} == {{{name}}}{{^-last}} &&{{/-last}}{{#-last}};{{/-last}}
  {{/vars}}

  @override
  int get hashCode =>
  {{#vars}}
    ({{{name}}} == null ? 0 : {{{name}}}.hashCode){{^-last}} +{{/-last}}{{#-last}};{{/-last}}
  {{/vars}}

  factory {{{classname}}}.fromJson(Map<String, dynamic> json) => _${{{classname}}}FromJson(json);

  Map<String, dynamic> toJson() => _${{{classname}}}ToJson(this);

  @override
  String toString() {
    return toJson().toString();
  }

}
{{#vars}}
    {{#isEnum}}
        {{^isContainer}}

{{>serialization/json_serializable/json_serializable_enum_inline}}
        {{/isContainer}}
        {{#isContainer}}
            {{#mostInnerItems}}

{{>serialization/json_serializable/json_serializable_enum_inline}}
            {{/mostInnerItems}}
        {{/isContainer}}
    {{/isEnum}}
{{/vars}}